package com.multi.thread.chapter07.demo02;

public class Run {
	
	public static void main(String[] args) {
		ThreadA a = new ThreadA();
		ThreadB b = new ThreadB();
		ThreadGroup group = new ThreadGroup("线程组");
		Thread threada = new Thread(group, a);
		Thread threadb = new Thread(group, b);
		threada.start();
		threadb.start();
		System.out.println("活跃的线程数：" + group.activeCount());
		System.out.println("线程组的名称为：" + group.getName());
	}

}
